<template>
  <div class="pad-20 bgc-default">
    <div class="tab-sticky">
      <el-tabs v-model="brandType">
        <el-tab-pane label="供货联盟" name="0"></el-tab-pane>
        <!-- <el-tab-pane label="淘宝联盟" name="1"></el-tab-pane> -->
        <el-tab-pane label="我的供货" name="2"></el-tab-pane>
        <el-tab-pane label="我的选品" name="3"></el-tab-pane>
      </el-tabs>
    </div>
    <div class="bg-color-white mar-t-10">
      <supply-alliance-list v-if="brandType === '0'"></supply-alliance-list>
      <taobao-goods v-if="brandType === '1'"></taobao-goods>
      <my-supply v-if="brandType === '2'"></my-supply>
      <my-selection-goods v-if="brandType === '3'"></my-selection-goods>
    </div>
  </div>
</template>

<script>
  import TaoBaoGoods from '../taobao-goods/index'
  import SupplyAllianceList from '../supply-alliance/supply-alliance-list/index'
  import MySupply from '../supply-alliance/my-supply/index'
  import MySelectionGoods from '../supply-alliance/my-selection-goods/index'
  export default {
    components: {
      SupplyAllianceList,
      TaoBaoGoods,
      MySupply,
      MySelectionGoods
    },
    data() {
      return {
        brandType: '0'
      }
    },
    // 初始化页面
    created() {
      const queryParams = this.getCurrentPage().query
      this.brandType = !queryParams.brandType ? '0' : queryParams.brandType.toString()
    },
    mounted() {},
    methods: {}
  }
</script>

<style scoped lang="less">
  .tab-sticky {
    position: sticky;
    top: 0px;
    left: 20px;
    width: calc(100% + 40px);
    background: white;
    z-index: 1000;
    padding-top: 10px;
    padding-left: 17px;
    margin-left: -20px;
    margin-top: -20px;

    /deep/ .el-tabs__header {
      margin: 0;
    }
  }
</style>
